package bar.dark.lee.stats;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import bar.dark.lee.R;
import bar.dark.lee.budget.BudgetActivity;
import bar.dark.lee.budget.BudgetTabActivity;
import bar.dark.lee.common.SuperInterface;
import bar.dark.lee.select.search.SearchActivity;

public class StatsDialogActivity extends Activity implements SuperInterface {
	
	private View viewBudget;
	private View viewStats;
	private Button btnCancel;

	private Intent intent;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		
	    setContentView(R.layout.stats_dialog_activity);
	    
	    setFindView();
	    setDataSetting();
	    setClickListener();
	    
	}

	@Override
	public void setFindView() {
		viewBudget = findViewById(R.id.statsDialog_Budget);
		viewStats = findViewById(R.id.statsDialog_Stats);
		btnCancel = (Button) findViewById(R.id.statsDialog_cancel);
	}

	@Override
	public void setDataSetting() {
		
	}

	@Override
	public void setClickListener() {
		
		viewBudget.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				intent = new Intent(getApplicationContext(), BudgetTabActivity.class);
				startActivity(intent);
				finish();
			}
		});
		
		viewStats.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				intent = new Intent(getApplicationContext(), StatsActivity.class);
				startActivity(intent);
				finish();
			}
		});
		
		btnCancel.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				finish();
			}
		});
	}
}
